<div>
  <%= form.text_field :title, autofocus: true %>
</div>

<div>
  <%= text_editor_for(form, :description) %>
</div>

<div>
  <%= form.select :type_of_meeting,
                  @form.type_of_meeting_select,
                  { include_blank: t(".select_a_meeting_type") },
                  { multiple: false } %>
</div>

<div data-meeting-type="in_person">
  <%= form.geocoding_field :address, input_html: { required: false }, help_text: t(".address_help") %>
</div>

<div data-meeting-type="in_person">
  <%= form.text_area :location, help_text: t(".location_help") %>
</div>

<div>
  <%= form.text_area :location_hints, help_text: t(".location_hints_help") %>
</div>

<div data-meeting-type="online">
  <%= form.text_field :online_meeting_url, help_text: t(".online_meeting_url_help") %>
</div>

<div data-meeting-type="online">
  <%= form.select :iframe_embed_type,
                  @form.iframe_embed_type_select,
                  {
                    multiple: false,
                    help_text: t(".iframe_embed_type_html", domains: Decidim::Meetings.embeddable_services&.join(" "))
                  } %>
</div>

<div class="iframe-fields--access-level" id="meeting_iframe_embed_type" data-meeting-type="online-access-level">
  <%= form.select :iframe_access_level,
                  @form.iframe_access_level_select,
                  { include_blank: t(".select_an_iframe_access_level") },
                  { multiple: false } %>
</div>

<div>
  <%= form.datetime_field :start_time %>
</div>

<div>
  <%= form.datetime_field :end_time %>
</div>

<% if @form.taxonomy_filters&.any? %>
  <% @form.taxonomy_filters.each do |filter| %>
    <%= filter_taxonomy_items_select_field form, :taxonomies, filter %>
  <% end %>
<% end %>

<div class="row column">
  <%= form.select :registration_type,
                  @form.registration_type_select,
                  { include_blank: t(".select_a_registration_type") },
                  { multiple: false } %>
</div>

<div class="row column" id="meeting_available_slots">
  <%= form.number_field :available_slots, help_text: t(".available_slots_help") %>
</div>

<div id="meeting_registration_terms">
  <%= text_editor_for(form, :registration_terms) %>
</div>

<div id="meeting_registration_url">
  <%= form.text_field :registration_url, help_text: t(".registration_url_help") %>
  <label><%= t(".disclaimer", organization: organization_name(current_component.organization)) %></label><br>
</div>

<%= append_javascript_pack_tag "decidim_meetings" %>
